Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Notes and Domino Application Development wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
Community Articles > Developing Applications > Developing XPage Applications > XPages 'compositeData' not found
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Community articleXPages 'compositeData' not found
Added by ~Elizabeth Cisboosiburakol | Edited by ~Elizabeth Cisboosiburakol on June 1, 2011 | Version 6
expanded Abstract
collapsed Abstract
The custom control auto-remove functionality will sometimes result in "'compositeData' not found" error pages.
Tags: custom controls, autoRemove, XPages

When developing an XPages Custom Control you may encounter the issue:

Error while executing JavaScript action expression
'compositeData' not found


If your custom control contains only a single control that is one of these tags:
xp:viewColumn, xp:column, xp:eventHandler, xp:selectItem, xp:selectItems
then the compositeData is not available in "Compute Dynamically" bindings,
only in "Compute on Page Load" bindings.

Normally when a custom control is inserted into an XPage, it leaves a panel-like control
in the control tree, the UIIncludeComposite. That panel provides functionality:
  • it publishes the compositeData to be available in compute dynamically bindings
  • it publishes any data sources that were defined on the root of the custom control page,
    and handles the other data-related properties (readonly, acl etc)
  • it provides a clientId naming scope.
  • So if you have a custom control containing
    <xp:div id="div1">
    and an outer page containing:
    <xp:myCustom>
    <xp:myCustom>
    it ensures the 2 divs have different ids in the HTML source:
    <div id="view:_id1:_id2:div1"></div>
    <div id="view:_id1:_id3:div1"></div>
    (the first custom control panel is _id2, and the 2nd custom control panel is _id3)
  • etc. It provides all of the non-load-time custom control behavior.

The controls listed above depend on their parent container tag,
and do not work a panel is inserted in the tree between that control and their parent.
For example, for xp:column if you have
<xp:dataTable>
    <xp:panel>
        <xp:column>
    </xp:panel>
<xp:dataTable>

then the dataTable does not find the column in its direct children,
so the column would not be output as part of the dataTable.

Hence when you create a custom control that only contains one of the tags above,
the panel will be automatically removed after the contents are loaded,
so the compositeData will not be available during dynamic bindings.

If you do want the panel to be removed, then the workaround to the "compositeData not found"
error is to use a load-time binding (in the JavaScript editor, choose "Compute on Page Load").

If you do not want the panel to be removed, you can either
add some content to the custom control page (like a <xp:br/> or a <xp:text value=" "/>),
or you can programmatically prevent the autoRemove, by adding this code to the custom control:


expanded Attachments (0)
collapsed Attachments (0)
expanded Versions (10)
collapsed Versions (10)
Version Comparison     
VersionDateChanged by              Summary of changes
10Jun 1, 2011, 2:12:57 PM~Fred Ektumilitetsi  Publishing the initial version.
8Jun 1, 2011, 2:10:40 PM~Elizabeth Cisboosiburakol  
7Jun 1, 2011, 1:49:17 PM~Elizabeth Cisboosiburakol  Minor Change
This version (6)Jun 1, 2011, 1:45:53 PM~Elizabeth Cisboosiburakol  
5Jun 1, 2011, 1:44:14 PM~Elizabeth Cisboosiburakol  Minor Change
4Jun 1, 2011, 1:43:20 PM~Elizabeth Cisboosiburakol  
3Jun 1, 2011, 1:42:05 PM~Elizabeth Cisboosiburakol  Minor Change
2Jun 1, 2011, 1:41:21 PM~Elizabeth Cisboosiburakol  
1Jun 1, 2011, 1:38:54 PM~Elizabeth Cisboosiburakol  initial version
1Jun 1, 2011, 1:40:28 PM~Elizabeth Cisboosiburakol  Minor Change
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL
  • Privacy
  • Accessibility